//
//  FileParseUnitTest.cpp
//  ConstructGccfg2.0
//
//  Created by Bryce Holton on 12/9/12.
//  Copyright (c) 2012 Bryce Holton. All rights reserved.
//

#include "FileParseUnitTest.h"
#include "FileParse.h"
#include <assert.h>

void FileParseUnitTest::ParseFunctionTest1()
{
    FileParse parse("dijkstra_large.c.080t.dom1");
    ProgramFunction *testFunction = parse.ParseFunction();
    
    assert(testFunction != NULL);
    
    delete testFunction;
}
void FileParseUnitTest::ParseFunctionTest2()
{
    vector<ProgramFunction *> testFunctions;
    FileParse parse("dijkstra_large.c.080t.dom1");
    
    for (int i = 0; i < 6; i++)
    {
        testFunctions.push_back(parse.ParseFunction());
        assert(testFunctions[i] != NULL);
    }
    for (int i = 0; i < 6; i++)
    {
        delete testFunctions[i];
    }
}
